package ioexercise;

import java.io.*;

public class FOSDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("fos.dat");
        FileOutputStream fos = new FileOutputStream(file,true);
//        FileOutputStream fos = new FileOutputStream("fos.dat");
        fos.write(1);
        fos.write(2);

        System.out.println("写出完毕！");
        fos.close();









//        File file = new File("fos.dat");
//        FileOutputStream fos = new FileOutputStream(file,true);
////        FileOutputStream fos = new FileOutputStream("fos.dat");
//        fos.write(1);
//        fos.write(2);
//
//        System.out.println("写出完毕！");
//        fos.close();
    }
}
